import { createApp } from 'vue'
import App from './App.vue'
import TDesign from 'tdesign-vue-next'
import '@/style/theme-var.css'
// 引入组件库全局样式资源
import 'tdesign-vue-next/es/style/index.css'
//引入pinia
import VueLazyload from 'vue-lazyload'
// import '@/assets/iconfont/iconfont.css' //引入iconfont
//引入setRem,设置手机端字体大小
import '@/utils/setRem'
import router from './router'

router.beforeEach((to, from, next) => {
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})

const app = createApp(App)
const pinia = createPinia()
app.use(pinia)
app.use(router)
app.use(VueLazyload)
app.use(TDesign)
app.mount('#app')
